.class public Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;
.super Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;
.source "TFSimpleHolder.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/tiffany/world/TFSimpleHolder;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "SimpleMoveAnimation"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/nemustech/tiffany/world/TFSimpleHolder;


# direct methods
.method public constructor <init>(Lcom/nemustech/tiffany/world/TFSimpleHolder;Lcom/nemustech/tiffany/world/TFSimpleHolder;)V
    .locals 0
    .parameter
    .parameter "holder"

    .prologue
    .line 803
    iput-object p1, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->this$0:Lcom/nemustech/tiffany/world/TFSimpleHolder;

    .line 804
    invoke-direct {p0, p1, p2}, Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;-><init>(Lcom/nemustech/tiffany/world/TFHolder;Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 805
    return-void
.end method


# virtual methods
.method public OnFrame()V
    .locals 6

    .prologue
    .line 846
    const-class v2, Lcom/nemustech/tiffany/world/TFWorld;

    monitor-enter v2

    .line 847
    :try_start_0
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->getTime()I

    move-result v3

    int-to-float v1, v3

    .line 849
    .local v1, t:F
    iget v3, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mInitialS:F

    iget v4, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mInitialV:F

    iget v5, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mAcceleration:F

    invoke-virtual {p0, v3, v4, v5, v1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->calcS(FFFF)F

    move-result v0

    .line 851
    .local v0, S:F
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->getHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v3

    iget v4, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mS:F

    sub-float v4, v0, v4

    invoke-virtual {v3, v4}, Lcom/nemustech/tiffany/world/TFHolder;->moveHeadModelStep(F)Z

    move-result v3

    if-nez v3, :cond_1

    .line 852
    iget v3, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mState:I

    const/4 v4, 0x2

    if-eq v3, v4, :cond_0

    .line 853
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->stop()V

    .line 857
    :goto_0
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->getHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFHolder;->requestLayout()V

    .line 858
    monitor-exit v2

    .line 859
    return-void

    .line 854
    :cond_0
    const-string v3, "TFSimpleHolder"

    const-string v4, "Attempt to call stop() on an animation wich stat is already STOP"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 858
    .end local v0           #S:F
    .end local v1           #t:F
    :catchall_0
    move-exception v3

    monitor-exit v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v3

    .line 856
    .restart local v0       #S:F
    .restart local v1       #t:F
    :cond_1
    :try_start_1
    iput v0, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mS:F
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0
.end method

.method public OnStart()Z
    .locals 1

    .prologue
    .line 808
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->getHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nemustech/tiffany/world/TFHolder;->getDeviation()F

    move-result v0

    iput v0, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mInitialS:F

    .line 809
    iget v0, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mInitialS:F

    iput v0, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mS:F

    .line 810
    const/4 v0, 0x1

    return v0
.end method

.method public OnStop()Z
    .locals 4

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 830
    const/4 v0, 0x1

    .line 831
    .local v0, bKeepGoing:Z
    iget-boolean v1, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mAutoRepositionMode:Z

    if-eqz v1, :cond_1

    .line 832
    invoke-virtual {p0, v3}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->reset(Z)V

    .line 833
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->this$0:Lcom/nemustech/tiffany/world/TFSimpleHolder;

    iget-object v1, v1, Lcom/nemustech/tiffany/world/TFSimpleHolder;->mMoveAni:Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;

    invoke-virtual {v1, v2}, Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;->lockAnimationEventListener(Z)V

    .line 834
    iget v1, p0, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->mAutoRepositionDuration:I

    invoke-virtual {p0, v1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->repositionObjects(I)Z

    move-result v0

    .line 835
    if-nez v0, :cond_0

    move v1, v2

    .line 840
    :goto_0
    return v1

    :cond_0
    move v1, v3

    .line 835
    goto :goto_0

    .line 839
    :cond_1
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->OnFrame()V

    move v1, v2

    .line 840
    goto :goto_0
.end method
